<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: SonarQube::SonarQube
  
    &mdash; Documentation by YARD 0.8.7.6
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!SonarQube/SonarQube.html";
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (S)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../SonarQube.html" title="SonarQube (module)">SonarQube</a></span></span>
     &raquo; 
    <span class="title">SonarQube</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: SonarQube::SonarQube
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">SonarQube::SonarQube</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/sonarqube-client.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    
<p>Initializes a connector object (RestClient::Resource), that stores the url
and optionally the username and password for the SonarQube server.</p>


  </div>
</div>
<div class="tags">
  
  <div class="examples">
    <p class="tag_title">Examples:</p>
    
      
        <p class="example_title"><div class='inline'>
<p>sq = SonarQube.new &#39;<a
href="http://localhost:9000">localhost:9000</a>&#39;, &#39;username&#39;,
&#39;password&#39;</p>
</div></p>
      
      <pre class="example code"><code></code></pre>
    
  </div>


</div>






  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (SonarQube) <strong>initialize</strong>(server_url, username = &#39;&#39;, password = &#39;&#39;) </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>A new instance of SonarQube.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#issues-instance_method" title="#issues (instance method)">- (TimeMachine::TimeMachine) <strong>issues</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns an issues object, can also be used to invoke issues methods without
having to store an object.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#projects-instance_method" title="#projects (instance method)">- (TimeMachine::TimeMachine) <strong>projects</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns a projects object, can also be used to invoke projects methods
without having to store an object.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#timemachine-instance_method" title="#timemachine (instance method)">- (TimeMachine::TimeMachine) <strong>timemachine</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Returns a timemachine object, can also be used to invoke timemachine
methods without having to store an object.</p>
</div></span>
  
</li>

      
    </ul>
  

<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="SonarQube::SonarQube (class)">SonarQube</a></span></tt>) <strong>initialize</strong>(server_url, username = &#39;&#39;, password = &#39;&#39;) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns a new instance of SonarQube</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


45
46
47
48
49
50
51</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sonarqube-client.rb', line 45</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_server_url'>server_url</span><span class='comma'>,</span> <span class='id identifier rubyid_username'>username</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_password'>password</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
  <span class='kw'>if</span> <span class='lbracket'>[</span><span class='id identifier rubyid_username'>username</span><span class='comma'>,</span> <span class='id identifier rubyid_password'>password</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_reduce'>reduce</span><span class='lparen'>(</span><span class='symbol'>:+</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
    <span class='ivar'>@connector</span><span class='op'>=</span><span class='const'>RestClient</span><span class='op'>::</span><span class='const'>Resource</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_server_url'>server_url</span><span class='rparen'>)</span>
  <span class='kw'>else</span>
    <span class='ivar'>@connector</span><span class='op'>=</span><span class='const'>RestClient</span><span class='op'>::</span><span class='const'>Resource</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_server_url'>server_url</span><span class='comma'>,</span> <span class='id identifier rubyid_username'>username</span><span class='comma'>,</span> <span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="issues-instance_method">
  
    - (<tt><span class='object_link'><a href="TimeMachine/TimeMachine.html" title="SonarQube::TimeMachine::TimeMachine (class)">TimeMachine::TimeMachine</a></span></tt>) <strong>issues</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns an issues object, can also be used to invoke issues methods without
having to store an object</p>


  </div>
</div>
<div class="tags">
  
  <div class="examples">
    <p class="tag_title">Examples:</p>
    
      
        <p class="example_title"><div class='inline'>
<p>issues = SonarQube.issues</p>
</div></p>
      
      <pre class="example code"><code>or if we don&#39;t want a persistent object:</code></pre>
    
      
        <p class="example_title"><div class='inline'>
<p>puts &quot;the list with all the issues is: #{SonarQube.issues.get}&quot;</p>
</div></p>
      
      <pre class="example code"><code></code></pre>
    
  </div>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="TimeMachine/TimeMachine.html" title="SonarQube::TimeMachine::TimeMachine (class)">TimeMachine::TimeMachine</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


76
77
78</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sonarqube-client.rb', line 76</span>

<span class='kw'>def</span> <span class='id identifier rubyid_issues'>issues</span>
  <span class='const'>Issues</span><span class='op'>::</span><span class='const'>Issues</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@connector</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="projects-instance_method">
  
    - (<tt><span class='object_link'><a href="TimeMachine/TimeMachine.html" title="SonarQube::TimeMachine::TimeMachine (class)">TimeMachine::TimeMachine</a></span></tt>) <strong>projects</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns a projects object, can also be used to invoke projects methods
without having to store an object</p>


  </div>
</div>
<div class="tags">
  
  <div class="examples">
    <p class="tag_title">Examples:</p>
    
      
        <p class="example_title"><div class='inline'>
<p>my_proj = SonarQube.projects</p>
</div></p>
      
      <pre class="example code"><code>or if we don&#39;t want a persistent object:</code></pre>
    
      
        <p class="example_title"><div class='inline'>
<p>puts &quot;available projects are: #{SonarQube.projects.list}&quot;</p>
</div></p>
      
      <pre class="example code"><code></code></pre>
    
  </div>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="TimeMachine/TimeMachine.html" title="SonarQube::TimeMachine::TimeMachine (class)">TimeMachine::TimeMachine</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


67
68
69</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sonarqube-client.rb', line 67</span>

<span class='kw'>def</span> <span class='id identifier rubyid_projects'>projects</span>
  <span class='const'>Projects</span><span class='op'>::</span><span class='const'>Projects</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@connector</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="timemachine-instance_method">
  
    - (<tt><span class='object_link'><a href="TimeMachine/TimeMachine.html" title="SonarQube::TimeMachine::TimeMachine (class)">TimeMachine::TimeMachine</a></span></tt>) <strong>timemachine</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Returns a timemachine object, can also be used to invoke timemachine
methods without having to store an object</p>


  </div>
</div>
<div class="tags">
  
  <div class="examples">
    <p class="tag_title">Examples:</p>
    
      
        <p class="example_title"><div class='inline'>
<p>my_tm = SonarQube.timemachine</p>
</div></p>
      
      <pre class="example code"><code>or if we don&#39;t want a persistent object:</code></pre>
    
      
        <p class="example_title"><div class='inline'>
<p>puts &quot;coverage for my project is:
#{SonarQube.timemachine.get(my_awesome_project, coverage)}&quot;</p>
</div></p>
      
      <pre class="example code"><code></code></pre>
    
  </div>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="TimeMachine/TimeMachine.html" title="SonarQube::TimeMachine::TimeMachine (class)">TimeMachine::TimeMachine</a></span></tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


58
59
60</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sonarqube-client.rb', line 58</span>

<span class='kw'>def</span> <span class='id identifier rubyid_timemachine'>timemachine</span>
  <span class='const'>TimeMachine</span><span class='op'>::</span><span class='const'>TimeMachine</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@connector</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Sun Jun 26 01:28:14 2016 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.6 (ruby-2.3.0).
</div>

  </body>
</html>